package me.huha.client;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * @Title: EmailAuthenticator.java
 * @Author: Yepx
 * @mail: yepx2013@gmail.com
 * @CreateTime: 2017年9月29日 上午10:44:19
 * @Todo: 对于email 用户的封装
 */
public class EmailAuthenticator extends Authenticator {
	
	/** 帐号 */
	private String user;  
    /** 密码 */
	private String pass;  

	public EmailAuthenticator(String user,String pass){  
        this.user=user;  
        this.pass=pass;  
    }  
   
	@Override  
    protected PasswordAuthentication getPasswordAuthentication() {  
        return new PasswordAuthentication(user,pass);  
    }  
}
